#ifndef RISING_STAR_SESSION_H
#define RISING_STAR_SESSION_H

#include "Config.h"

using namespace boost::asio;
using namespace boost;

enum {MAX_PACKET_LEN = 4096};

namespace RisingStar
{
	class CTCPSession:public boost::noncopyable
	{
		
	public:
		CTCPSession(IOServicePtr& pIOService);
		
		~CTCPSession();
		bool Start();
		ip::tcp::socket& GetSocket();

	protected:
	
		void HandleRead(const boost::system::error_code& error, size_t bytesTransferred);
		void HandleWrite(const boost::system::error_code& error);
		
		ip::tcp::socket	mSocket;
	
		char mData[MAX_PACKET_LEN];
		IOServicePtr mIOServicePtr;
	};
	
	
}

#endif
